<%@ page contentType="text/html; charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ include file="fiedsName.jsp"%>

<%--Результат предыдущей операции--%>
<c:if test="${previousEvent ne null}">
    <c:choose>
        <c:when test="${previousEvent eq 'search'}">
            <h3>Результаты поиска по запросу:</h3>
            <c:if test="${not empty searchParam.drugName}"><p>${searchDrugsFields.name}${searchParam.drugName};</c:if>
            <c:if test="${not empty searchParam.substance}"><p>${searchDrugsFields.substance}${searchParam.substance};</c:if>
            <c:if test="${not empty searchParam.farmaaction}"><p>${searchDrugsFields.farmaaction}${searchParam.farmaaction};</c:if>
            <c:if test="${not empty searchParam.minCost}"><p>${searchDrugsFields.minCost}${searchParam.minCost} руб;</c:if>
            <c:if test="${not empty searchParam.maxCost}"><p>${searchDrugsFields.maxCost}${searchParam.maxCost} коп;</c:if>
        </c:when>
        <c:when test="${previousEvent eq 'delete'}">
            <c:choose>
                <c:when test="${deleteResult eq 'ok'}"><p>Лекарство успешно удалено</c:when>
                <c:otherwise><h3>Ошибка удаления!</h3></c:otherwise>
            </c:choose>
        </c:when>
    </c:choose>
</c:if>